From: Ewan Mellor Date: Thu, 22 Mar 2007 18:36:53 +0000 (+0000) Subject: Fix VM.is_a_template. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15277^2~28^2~4 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=9a0b8303dc91f9bdf361dee60f2648f12643bdd4;p=xen.git Fix VM.is_a_template. Signed-off-by: Ewan Mellor --- diff --git a/tools/python/xen/xend/XendAPI.py b/tools/python/xen/xend/XendAPI.py index 480bf66b1c..e7b408ae3c 100644 --- a/tools/python/xen/xend/XendAPI.py +++ b/tools/python/xen/xend/XendAPI.py @@ -1200,9 +1200,8 @@ class XendAPI(object): dom = XendDomain.instance().get_vm_by_uuid(vm_ref) return xen_api_todo() - def VM_get_is_a_template(self, session, vm_ref): - dom = XendDomain.instance().get_vm_by_uuid(vm_ref) - return xen_api_todo() + def VM_get_is_a_template(self, session, ref): + return self.VM_get('is_a_template', session, ref) def VM_get_memory_dynamic_max(self, session, vm_ref): dom = XendDomain.instance().get_vm_by_uuid(vm_ref) @@ -1481,7 +1480,7 @@ class XendAPI(object): 'name_label': xeninfo.getName(), 'name_description': xeninfo.getName(), 'user_version': 1, - 'is_a_template': False, + 'is_a_template': xeninfo.info.get('is_a_template'), 'auto_power_on': False, 'resident_on': XendNode.instance().uuid, 'memory_static_min': xeninfo.get_memory_static_min(),